<?php

if (isset($_GET["class"]) && isset($_GET["placenr"]))
{	$class = $_GET["class"];
	$placenr = $_GET["placenr"];
	
	$QUERY = "
		INSERT INTO leerlingtoegang (plaatsnr, klas) 
		VALUES ('$placenr', '$class');
	";
	$RESULT = mysql_query($QUERY) or die('<b style="color: red; font-size: 25px;">Error!</b><br />QUERY:<br />' . $QUERY . '<br /><br />' . mysql_error());
	////echo "$QUERY<br />";
}
elseif (isset($_GET["hourid"]) && isset($_GET["placenr"]))
{
	$hourid = $_GET["hourid"];
	$placenr = $_GET["placenr"];
	
	$QUERY = "
		INSERT INTO studieuurplaats (plaatsnr, studieuur) 
		VALUES ('$placenr', '$hourid');
	";
	$RESULT = mysql_query($QUERY) or die('<b style="color: red; font-size: 25px;">Error!</b><br />QUERY:<br />' . $QUERY . '<br /><br />' . mysql_error());
	////echo "$QUERY<br />";
	
}
else
{


?><table cellspacing="0" align="left" valign="top">
	<tr>
		<td colspan="<?php print($DBC->rows); ?>">
			<h1>Voeg toe: plaats</h1>
		</td>
	</tr>
	<tr style="vertical-align: top;">
		<td>
			nr:
		</td>
		<td>
			<input type="text" style="display: block; width: 100px;" />
		</td>
	</tr>
	<tr style="vertical-align: top;" height="100">
		<td>
			basis:
		</td>
		<td>
			<select style="display: block; width: 100px;">
				<option>b1</option>
				<option>b2</option>
			</select>
		</td>
	</tr>
	<tr style="vertical-align: top;">
		<td colspan="2" align="center">
			<a onclick="" class="bigbutton">voeg&nbsp;toe!</a>
		</td>
	</tr>
</table>
<?


}

?>